
var binding = document.getElementById('binding-btn');
    binding.addEventListener('click',binding_callback);

    function binding_callback(){
        // console.log('click binding-btn');
        var equip_id = $('#binding-btn').text();
        console.log(equip_id);

        $.ajax({
            url: '/binding/equip_id?equip_id=' + equip_id,
            type: 'GET',
            success: function (data){
                var show_epstaus = document.getElementById('equip-status');
                show_epstaus.innerText = data;

            },
            error:function (){
                console.log('绑定命令发送失败');
            }
        })
    }



var cancel = document.getElementById('cancel-btn');
    cancel.addEventListener('click',cancel_callback);

    function cancel_callback(){
        // console.log('click binding-btn');
        var equip_id = $('#cancel-btn').text();
        console.log(equip_id);

        $.ajax({
            url: '/binding/equip_id?equip_id=' + equip_id,
            type: 'GET',
            success: function (data){
                var show_epstaus = document.getElementById('equip-status');
                show_epstaus.innerText = data;

            },
            error:function (){
                console.log('绑定命令发送失败');
            }
        })
    }




